import http from "@/api";
import { Login } from "@/api/interface/login";
import { PORT1 } from "@/api/config/servicePort";
/**
 * @name 登录模块
 */

/** 登录 */
export const authLogin = (params: Login.ReqAuthLogin) => {
	return http.post<Login.ResAuthLogin>(PORT1 + `/admin/auth/Login`, params);
};
/** 登录学校 */
export const loginSchool = (params: Login.ReqLoginSchool) => {
	return http.post<Login.ResAuthLogin>(PORT1 + `/admin/auth/LoginSchool`, params);
};

/** 修改密码 */
export const updatePassword = (params: Login.ReqUpdatePassword) => {
	return http.post(PORT1 + `/admin/admin/UpdatePassword`, params);
};

/** 退出登录 */
export const logout = () => {
	return http.post(PORT1 + `/admin/auth/Logout`);
};